"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogClearManager = void 0;
const AccountDailyLogin_1 = require("../account_server/dao/AccountDailyLogin");
const AccountDailyRegister_1 = require("../account_server/dao/AccountDailyRegister");
const Config_1 = require("../src/config/Config");
const checkClearClubHistory_Inteval = 1000 * 60 * 60 * 24; //1天检查一次
class LogClearManager {
    constructor() {
        this.last_check_club_time = 0;
    }
    checkClear(now) {
        this.checkClearClubHistory(now);
        this.req_server_update_server(now);
    }
    checkClearClubHistory(now) {
        if (now - this.last_check_club_time >= checkClearClubHistory_Inteval) {
            let date = new Date();
            if (date.getHours() == 5) { //你见过半夜5点的篮球吗？
                this.last_check_club_time = now;
                let delete_time_7 = now - Config_1.Config.OneDay * 7; //保留7天记录
                // Logger.log("LogClearManager===", delete_time_7, DateUtil.formatDateStr(delete_time_7))
                //定时清理俱乐部进出信息
                // Club_HistoryDao.clear_in_out_history(delete_time)
                // //清理俱乐部排行
                // ClubTopDao.clear_club_top(delete_time)
                // //定时清理房间战绩
                // RoomResultDao.checkClearRoomResult(delete_time)
                // //定时清理房间战绩录像
                // RoomVideoDao.checkClear(delete_time)
                // //定时清理俱乐部冻结记录
                // Club_Freeze_HistoryDao.clear(delete_time)
                // //定时清理充值垃圾订单
                // ChargeDao.clear(delete_time)
                // User_Spend_DailyDao.clear()
                // //用户钻石明细
                // User_Gems_HistoryDao.clear(delete_time)
                // User_Coins_HistoryDao.clear(delete_time)
                // Daily_ResourceDao.clear(delete_time)
                // MatchUserDao.clearMatchDaily(delete_time)
                // //定时清理日志
                // GiveHistoryDao.clear(delete_time)
                // RoomStatisticsDao.clear(now - Config.OneDay * 35)
                let delete_time_60 = now - Config_1.Config.OneDay * 7;
                AccountDailyLogin_1.AccountDailyLogin.clear(delete_time_60);
                AccountDailyRegister_1.AccountDailyRegister.clear(delete_time_60);
            }
        }
    }
    req_server_update_server(now) {
    }
}
exports.LogClearManager = LogClearManager;
LogClearManager.instance = new LogClearManager();
